﻿using System;

namespace diantou.web.enterprise
{
    /// <summary>
    /// 工作职位相关考试
    /// </summary>
    [fastCSharp.code.cSharp.webView(IsPage = false, IsPool = true)]
    partial class jobExam : examPermissionView<jobExam>
    {
        /// <summary>
        /// 工作职位
        /// </summary>
        [fastCSharp.emit.webView.clearMember]
        private diantou.examDataAccess.enterpriseJob job;
        /// <summary>
        /// 考试列表
        /// </summary>
        [fastCSharp.emit.webView.clearMember]
        private diantou.examDataAccess.exam[] exams;
        /// <summary>
        /// 初始化考试列表
        /// </summary>
        /// <param name="jobId"></param>
        /// <returns>是否成功</returns>
        private bool loadView(int jobId)
        {
            if (jobId != 0)
            {
                job = diantou.examDataAccess.tcpCall.enterpriseJob.get(jobId, currentUserId);
                if (job != null)
                {
                    exams = diantou.examDataAccess.clientCache.Exam.Get(diantou.examDataAccess.tcpCall.enterpriseJob.getExamIds(jobId, currentUserId));
                    return true;
                }
            }
            AjaxResponse(webConfig.NotFound404);
            return false;
        }
    }
}
